package com.eric.db;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import jodd.db.DbQuery;

public class Mysql {

	public static void main(String[] args) throws ClassNotFoundException, SQLException {
		Connection con;
		Class.forName("com.mysql.jdbc.Driver");

		String base = "jdbc:mysql://eric-aliyun:3306/";
		String db = "test";
		String url = base + db;
		String user = "root";// user name for the specified database
		String pwd = "wih486eev";// the corresponding password ";

		con = DriverManager.getConnection(url, user, pwd);

		String s = "你好";
		DbQuery query = new DbQuery(con, "insert into `test`.`indexed_keyword` (`kw`) values('" + s + "')");
		query.executeUpdate();
		query.close();

	}

}
